using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class TTesion_Preoperative_explainedMap : EntityTypeConfiguration<TTesion_Preoperative_explained>
    {
        public TTesion_Preoperative_explainedMap()
        {
            // Primary Key
            this.HasKey(t => t.TTPE_ID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_V_reference_vessel)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_V_reference_vessel_Description)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_V_TL_length)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_V_TL_length_Description)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_V_Preoperative_stenosis)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_V_Preoperative_stenosis_Description)
                .HasMaxLength(50);

            this.Property(t => t.TTPE_V_Preoperative_min_lumen_diameter)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_V_Preoperative_min_lumen_Description)
                .HasMaxLength(50);

            this.Property(t => t.TTPE_TIMI_Blood_flow)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_Types_lesions)
                .HasMaxLength(20);

            this.Property(t => t.TTPE_Types_lesions_Description)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("TTesion_Preoperative_explained");
            this.Property(t => t.TTPE_ID).HasColumnName("TTPE_ID");
            this.Property(t => t.TTL_ID).HasColumnName("TTL_ID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.TTPE_V_reference_vessel).HasColumnName("TTPE_V_reference_vessel");
            this.Property(t => t.TTPE_V_reference_vessel_Description).HasColumnName("TTPE_V_reference_vessel_Description");
            this.Property(t => t.TTPE_V_TL_length).HasColumnName("TTPE_V_TL_length");
            this.Property(t => t.TTPE_V_TL_length_Description).HasColumnName("TTPE_V_TL_length_Description");
            this.Property(t => t.TTPE_V_Preoperative_stenosis).HasColumnName("TTPE_V_Preoperative_stenosis");
            this.Property(t => t.TTPE_V_Preoperative_stenosis_Description).HasColumnName("TTPE_V_Preoperative_stenosis_Description");
            this.Property(t => t.TTPE_V_Preoperative_min_lumen_diameter).HasColumnName("TTPE_V_Preoperative_min_lumen_diameter");
            this.Property(t => t.TTPE_V_Preoperative_min_lumen_Description).HasColumnName("TTPE_V_Preoperative_min_lumen_Description");
            this.Property(t => t.TTPE_TIMI_Blood_flow).HasColumnName("TTPE_TIMI_Blood_flow");
            this.Property(t => t.TTPE_Types_lesions).HasColumnName("TTPE_Types_lesions");
            this.Property(t => t.TTPE_Types_lesions_Description).HasColumnName("TTPE_Types_lesions_Description");
        }
    }
}
